/*
 * @Author: Bo Cai
 * @Mail: caibo0520@qq.com
 * @Date: 2021-11-20 14:39:30
 * @LastEditors: Bo Cai
 * @LastEditTime: 2021-12-22 11:51:01
 */
module.exports = {
  plugins: [
    {
      src: '~/plugins/nuxt-swiper-plugin.js',
      ssr: false
    },
  ],
  css: [
    'swiper/dist/css/swiper.css'
  ],
  /*
  ** Headers of the page
  */
  head: {
    title: '青动大学生运动社区',
    meta: [
      { charset: 'utf-8' },
      {
        name: 'viewport',
        content: 'width=device-width, initial-scale=1'
      },
      {
        hid: 'description',
        name: 'description',
        content: '中国最专业的高校运动社交平台！'
      }
    ],
    link: [
      {
        rel: 'icon',
        href: '/favicon.ico'
      }
    ]
  },
  /*
  ** Customize the progress bar color
  */
  loading: { color: '#3B8070' },
  /*
  ** Build configuration
  */
  build: {
    /*
    ** Run ESLint on save
    */
    extend (config, {
      isDev,
      isClient
    }) {
      if (isDev && isClient) {
        config.module.rules.push({
          enforce: 'pre',
          test: /\.(js|vue)$/,
          loader: 'eslint-loader',
          exclude: /(node_modules)/
        })
      }
    }
  },
  env: {
    baseUrl: process.env.baseURL
  },
  modules: [
    //有参数配置的
    'cookie-universal-nuxt'
  ],
}
